package org.msss.sprites;

import org.msss.gamebasic.*;
import org.msss.resource.ImageDB;

public class RightHand extends Sprite {
	
	public void create() {
		addImage(ImageDB.down_hand_0);
		addImage(ImageDB.down_hand_1);
		addImage(ImageDB.down_hand_2);
		addImage(ImageDB.down_hand_3);
		addImage(ImageDB.down_hand_4);
		addImage(ImageDB.down_hand_5);
		addImage(ImageDB.down_hand_6);
		addImage(ImageDB.down_hand_7);
		addImage(ImageDB.down_hand_8);
		
		setAnimationOn(false);
		
		setZ(-10);
	}
	
	public void gridDirection(int gridX, int gridY) {
		
			if (gridX == 0 && gridY == 0) {
				setCurrentFrame(3);
			}
			if (gridX == 0 && gridY == 1) {
				setCurrentFrame(4);
			}
			if (gridX == 0 && gridY == 2) {
				setCurrentFrame(5);
			}
			if (gridX == 1 && gridY == 0) {
				setCurrentFrame(2);
			}
			if (gridX == 1 && gridY == 1) {
				setCurrentFrame(8);
			}
			if (gridX == 1 && gridY == 2) {
				setCurrentFrame(6);
			}
			if (gridX == 2 && gridY == 0) {
				setCurrentFrame(1);
			}
			if (gridX == 2 && gridY == 1) {
				setCurrentFrame(0);
			}
			if (gridX == 2 && gridY == 2) {
				setCurrentFrame(7);
			}
		}
		
	
}
